package AdapterSlf4j;

import org.slf4j.ILoggerFactory;
import org.slf4j.spi.LoggerFactoryBinder;

public class StaticLoggerBinder implements LoggerFactoryBinder{
	
	/*
	 * unique instance
	 */
	private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
	private static final String loggerFactoryClassStr = LoggerFactory.class.getName();	
	private final ILoggerFactory loggerFactory;
	
	/*
	 * return the singleton
	 */
	public static final StaticLoggerBinder getSingleton(){
		return SINGLETON;
	}
 
	private StaticLoggerBinder(){
		loggerFactory = new LoggerFactory();
	}
	
	@Override
	public ILoggerFactory getLoggerFactory() {
		return loggerFactory;
	}

	@Override
	public String getLoggerFactoryClassStr() {
		return loggerFactoryClassStr;
	}

}
